package com.siwei.mes.entity.experiment;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;


/**
 * 试验台账生成委托规则设置(ExperimentGenConfig)实体类
 *
 * @author linzi
 * @since 2024-05-22 21:06:06
 */
@Data
@Accessors(chain = true)
@Table(name = "pk_experiment_gen_config")
@ApiModel(value = "ExperimentGenConfig", description = "试验台账生成委托规则设置")
public class ExperimentGenConfig implements Serializable {
    private static final long serialVersionUID = -85739182789708108L;
    /**
     * 主键id
     */
    @Id
    @ApiModelProperty(value = "试验台账生成委托规则设置主键ID", name = "id")
    private Long id;
    /**
     * 1-水泥 2-粉煤灰 3-矿渣粉 4-粗骨料 5-细骨料 6-外加剂 7-混凝土
     */
    @Column(name = "experiment_type")
    @ApiModelProperty(value = "1-水泥 2-粉煤灰 3-矿渣粉 4-粗骨料 5-细骨料 6-外加剂 7-混凝土", name = "experimentType")
    private Integer experimentType;
    /**
     * 是否打开 1-打开  0-关闭
     */
    @Column(name = "is_open")
    @ApiModelProperty(value = "是否打开 1-打开  0-关闭", name = "isOpen")
    private Integer isOpen;
    /**
     * 规则类型 1-快检 2-批检
     */
    @Column(name = "check_type")
    @ApiModelProperty(value = "规则类型 1-快检 2-批检", name = "checkType")
    private Integer checkType;
    /**
     * 规则 1-车车都检  2-按重量  3-按车数  4-按时间
     */
    @Column(name = "check_rules")
    @ApiModelProperty(value = "规则 1-车车都检  2-按重量  3-按车数  4-按时间", name = "checkRules")
    private Integer checkRules;
    /**
     * 阈值  多少吨或者是周几  根据规则来走的  1-周一 2-周二  以此类推  如果是多个日期用逗号隔开
     */
    @Column(name = "check_threshold")
    @ApiModelProperty(value = "阈值  多少吨或者多少天  根据规则来走的", name = "checkThreshold")
    private String checkThreshold;
    /**
     * 限定类型  1-同一厂家（同一配合比）   2-同一供应商（同一任务单）
     */
    @Column(name = "qualified_type")
    @ApiModelProperty(value = "限定类型  1-同一厂家（同一配合比）   2-同一供应商（同一任务单）", name = "qualifiedType")
    private Integer qualifiedType;

    @Column(name = "batch_day")
    @ApiModelProperty(value = "班次天数  一个班次几天")
    private Integer batchDay;

    @Column(name = "batch_time")
    @ApiModelProperty(value = "班次时间  只需要小时和分钟")
    private String batchTime;

    @Column(name = "is_custom")
    @ApiModelProperty(value = "是否自定义   1-自定义  0-不是自定义")
    private Integer isCustom;

    @Column(name = "test_code")
    @ApiModelProperty(value = "试验项目code  这个只有混凝土类型批检才有  自定义的  pk_test_project_info表")
    private String testCode;

    @Column(name = "test_name")
    @ApiModelProperty(value = "试验项目name   这个只有混凝土类型批检才有  自定义的  pk_test_project_info表")
    private String testName;

    @Column(name = "year_same_project")
    @ApiModelProperty(value = "当年同一工程  1-开启  0-未开启")
    private Integer yearSameProject;

    @Column(name = "year_same_mix")
    @ApiModelProperty(value = "当年同一配比  1-开启  0-未开启")
    private Integer yearSameMix;

    @Column(name = "combination_property_threshold")
    @ApiModelProperty(value = "综合性能  xxx 方 生成一个委托")
    private Integer combinationPropertyThreshold;

    @Column(name = "is_project_with_mix")
    @ApiModelProperty(value = "同工程同配比  1-开启  0-未开启")
    private Integer isProjectWithMix;

    @Column(name = "is_year")
    @ApiModelProperty(value = "限定为当年  1-限定  0-不限定")
    private Integer isYear;

    @Transient
    @ApiModelProperty(value = "多个试验项目code")
    private List<String> testCodeList;

    @Transient
    @ApiModelProperty(value = "多个规则设置")
    private List<ExperimentGenConfig> configList;
}
